//
//  PJOneViewController.m
//  PeiJue
//
//  Created by lxy on 2017/10/26.
//  Copyright © 2017年 lixiya. All rights reserved.
//

#import "PJOneViewController.h"
#import "PJTwoViewController.h"
@interface PJOneViewController ()


@end

@implementation PJOneViewController

- (void)loadView {
    UIScrollView *view = [[UIScrollView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    view.contentSize = CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
    self.view = view;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];

    
    UIButton *bt = [UIButton buttonWithType:UIButtonTypeSystem];
    bt.backgroundColor = [UIColor lightGrayColor];
    [bt setTitle:@"测试数据" forState:UIControlStateNormal];
    [bt setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [bt setImage:[UIImage imageNamed:@"tabBar_publish_click_icon"] forState:UIControlStateNormal];
    [bt xy_setBlockForControlEvents:UIControlEventTouchUpInside block:^(id  _Nonnull sender) {
        /*
         [XYUtils showMessageWithViewController:self title:@"提示" message:@"确定吗？" confirmHandler:^(UIAlertAction *action) {
         WebViewController *vc = [[WebViewController alloc] initWithURLString:@"https://www.baidu.com"];
         [self.navigationController pushViewController:vc animated:YES];
         } cancleHandler:^(UIAlertAction *action) {
         
         }];
         */
        [self.navigationController pushViewController:[[PJTwoViewController alloc] init] animated:YES];

        
    }];
    [self.view addSubview:bt];
    [bt mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.width.height.equalTo(@150);
    }];
    [bt xy_layoutButtonTitleImgWithStyle:UIButtonLayoutTypeLeft titleImgSpace:10];
    
    UITextField *tf1 = [[UITextField alloc] initWithFrame:CGRectMake(0, 500, 300, 60)];
    tf1.backgroundColor = [UIColor yellowColor];
    tf1.placeholder = @"xxxxxxx";
    [self.view addSubview:tf1];
    
    UITextField *tf2 = [[UITextField alloc] initWithFrame:CGRectMake(0, 600, 300, 60)];
    tf2.backgroundColor = [UIColor yellowColor];
    tf2.placeholder = @"xxxxxxxxxxxxxx";
    [self.view addSubview:tf2];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
